<template>
  <div class="sys-param-log-page">
    <el-card shadow="never">
      <div slot="header">参数修改记录</div>
      <el-table :data="pagedData" border stripe style="width: 100%">
        <el-table-column prop="name" label="参数名" width="150" />
        <el-table-column prop="oldValue" label="原值" width="120" />
        <el-table-column prop="newValue" label="新值" width="120" />
        <el-table-column prop="user" label="修改人" width="120" />
        <el-table-column prop="updateTime" label="修改时间" width="180" />
      </el-table>
      <div style="margin-top: 12px; text-align: right;">
        <el-pagination
          background
          layout="prev, pager, next, jumper"
          :total="tableData.length"
          :page-size="pageSize"
          :current-page.sync="currentPage"
        />
      </div>
    </el-card>
  </div>
</template>
<script>
export default {
  name: 'SystemParamLogView',
  data() {
    return {
      tableData: [
        { name: '系统名称', oldValue: '人生管理系统', newValue: '人生管理平台', user: 'admin', updateTime: '2024-06-01 10:10:00' },
        { name: '最大登录尝试', oldValue: '5', newValue: '10', user: 'admin', updateTime: '2024-06-01 10:12:00' },
        { name: '默认主题色', oldValue: '#4a9eff', newValue: '#fa709a', user: 'admin', updateTime: '2024-06-01 10:15:00' },
      ],
      currentPage: 1,
      pageSize: 5
    }
  },
  computed: {
    pagedData() {
      const start = (this.currentPage - 1) * this.pageSize;
      return this.tableData.slice(start, start + this.pageSize);
    }
  }
}
</script>
<style scoped>
/* .sys-param-log-page { padding: 30px; } */
</style> 